﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GrayParrot.Web.Formly
{
    [AttributeUsage(AttributeTargets.Property, Inherited = true, AllowMultiple = false)]
    public class FieldGroupAttribute : Attribute 
    {
        /// <summary>
        /// Gets or sets the name of the group...
        /// </summary>
        /// <value>
        /// The name of the group.
        /// </value>
        public string GroupName { get; set; }
        /// <summary>
        /// Gets or sets the row for the group ( each group lives in a separate row )...
        /// </summary>
        /// <value>
        /// The row.
        /// </value>
        public int Row { get; set; }
        /// <summary>
        /// Gets or sets the index of the property inside the row...
        /// </summary>
        /// <value>
        /// The position index in the row. By Default position is 1.
        /// </value>
        public int Index { get; set; }
        /// <summary>
        /// Gets or sets the number of columns occupied by the property....
        /// </summary>
        /// <value>
        /// The number of columns occupied by the input control. By Default occupies 1 column.
        /// </value>
        public int NumberOfColumns { get; set; }

        public FieldGroupAttribute()
        {
            this.NumberOfColumns = 1;
            this.Index = 1;
        }
    }
}
